package com.bdqn.controller;


import com.bdqn.entity.PmsBrand;
import com.bdqn.entity.util.RespBean;
import com.bdqn.service.PmsBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 品牌表 前端控制器
 * </p>
 *
 * @author hunter
 * @since 2022-04-30
 */
@RestController
@RequestMapping("/pms/product/brand")
public class PmsBrandController {
    @Autowired
    private PmsBrandService pmsBrandService;
    @GetMapping("/list")
    public RespBean list(){
        //基础的增删改查 直接调用
        List<PmsBrand> pmsBrandList =pmsBrandService.list();
        if (pmsBrandList.size()>0){
            return RespBean.ok("获取品牌列表成功",pmsBrandList);
        }else {
            return  RespBean.err("获取品牌列表失败");
        }
    }

}
